{__NOLAYOUT__}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>{$title}-{$seo_title}</title>
    <include file="Index:meta" />
    <!-- Swiper -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css" rel="stylesheet">
        <script>
        var keshi = {$keshi} ;
        var isuser = {$isuser} ;
        if(keshi == 2){
            alert('您没有权限观看') ;
            if(isuser == 2){
                window.location.href='http://user.fjhgkj.com.cn/index.php?u=jzzy&url={$url1}' ;
            }else{
               window.location.href='index.php?m=Index&a=details&pid={$zyinfo.id}&cid={$gangweiinfo.gwid}&oid={$xmid.xmid}' ;
            }
        }
    </script>
</head>

<body>
    <div id="page">
        <!-- Header -->
        <include file="Index:header" />
        <!-- Header End -->

        <section class="details-head container pt-40 mb-40">
            <h2 class="mb-20">{$title}</h2>
            <div class="breadcrumb_box clearfix mb-20 hide-sm">
                <ol class="breadcrumb">
                    <li>
                        <a href="index.php">
                            <i class="icon icon-home"></i>首页</a>
                    </li>
                    <li>
                        <a href="index.php?m=Index&a=major&pid={$zyinfo.id}">{$zyinfo['title']}</a>
                    </li>
                    <li>
                        <a href="index.php?m=Index&a=major&pid={$zyinfo.id}&cid={$zyid.id}">{$zyid['title']}</a>
                    </li>
                
                    <li>
                        <a href="index.php?m=Index&a=details&pid={$zyinfo.id}&cid={$gangweiinfo.gwid}&oid={$xmid.xmid}">{$gangweiinfo['title']}</a>
                    </li>
                    <li class="active">{$title}</li>
                </ol>
            </div>
            <div class="card-info-item">
                <label title="浏览数">
                    <i class="icon-fwl"></i>{$gangweiinfo.readpoint}</label>
                <label title="收藏数">
                    <i class="icon-star"></i>{$totalsc}</label>
            </div>
        </section>

        <section class="details-content">
            <div class="container">

                <section class="video-box clearfix">
                    <div class="iframe">
                        <if condition="$type eq 'rwid' || $type eq 'wkid'">
                            <iframe id="videosrc" class="video" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" data-play='{$file}' src="index.php?m=Index&a=video&file=http://hgedu.fjhgkj.com/{$file}"></iframe>
                        <else />
                            <iframe id="videosrc" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" data-play='{$file}' src="index.php?m=Index&a=pdf&file={$file}&title={$title|urlencode=###|urlencode=###}"></iframe>
                        </if>
                    </div>
                    <div class="messages">
                        <div class="box">
                            <ul>
                                <volist name="list" id="vo">
                                    <li>
                                        <div class="head">
                                            <img src="{$vo['account']['avatar']}">
                                            <span class="name">{$vo['account']['realname']}</span>
                                            <span class="date">{$vo.createtime}</span>
                                        </div>
                                        <p class="text">{$vo.content}</p>
                                    </li>
                                </volist>
                            </ul>
                        </div>
                        <div class="chat">
                            <div class="chat-texta">
                                <textarea class="form-control" id="pingluncontent"></textarea>
                            </div>
                            <div class="chat-btn text-right">
                                <a class="btn btn-primary sendpinglun">发送评论</a>
                            </div>
                        </div>
                    </div>
                </section>

                <section class="video-list clearfix">
                    <a class="pull-right">
                        <i class="icon-qrcode"></i>用手机看</a>
                    <div class="popover bottom">
                        <div class="arrow"></div>
                        <div class="popover-content">
                            <div class="qrcode"></div>
                        </div>
                    </div>
                    <a class="pull-right star">
                        <i <if condition="$tt eq '1'"> class="icon-star on "
                            <else /> class="icon-star"</if> ></i>收藏</a>
                    <div class="pic">
                        <img src="__PUBLIC__/dist/image/img.jpg" data-src="http://hgedu.fjhgkj.com{$gangweiinfo.bigimage}">
                    </div>
                    <if condition="$type eq 'rwid'">
                        <h3>相关教学视频</h3>
                        <elseif condition="$type eq 'wkid'" />
                        <h3>相关微课</h3>
                        <elseif condition="$type eq 'kjid'" />
                        <h3>相关电子课件</h3>
                        <elseif condition="$type eq 'dzjc'" />
                        <h3>相关电子教材</h3>
                    </if>
                    <div class="list">
                        <div class="swiper-container">
                            <div class="swiper-wrapper">
                                <if condition="$type eq 'rwid'">
                                    <volist name='xiangguan' id='vo' key='k'>
                                        <volist name="vo['rwsp']['val']" id="voo">
                                            <div <if condition=" $file eq $voo['file'] "> class="swiper-slide active"
                                                <else /> class="swiper-slide" </if> >
                                <eq name="voo['fileonoff']" value="true">
                                    <a href="index.php?m=Index&a=detailsplay&{$type}={$vo.id.val}&file={$voo.file}&title={$voo.name|urlencode=###|urlencode=###}" title="{$voo.name}">
                                        <else />
                                        <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();"
                                            title="{$vo.title.val}">
                                </eq>
                                <p>{$voo.name}</p>
                                </a>
                                </div>
                                </volist>
                                </volist>
                                <elseif condition="$type eq 'wkid'" />
                                <volist name='xiangguan' id='vo' key='k'>
                                    <div <if condition=" $file eq $vo['wksp']['val'] "> class="swiper-slide active"
                                        <else /> class="swiper-slide" </if> >
                                        <eq name="vo['fileonoff']['val']" value="true">
                                            <a href="index.php?m=Index&a=detailsplay&{$type}={$vo.id.val}&file={$vo['wksp']['val']}&title={$vo['title']['val']|urlencode=###|urlencode=###}" title="{$vo['title']['val']}">
                                                <else />
                                                <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();"
                                                    title="{$vo.title.val}">
                                        </eq>
                                        <p>{$vo['title']['val']}</p>
                                        </a>
                                    </div>
                                </volist>
                                <elseif condition="$type eq 'kjid'" />
                                <volist name='xiangguan' id='vo' key='k'>
                                    <div <if condition=" $file eq $vo['wswj']['val'] "> class="swiper-slide active"
                                        <else /> class="swiper-slide" </if> >
                                        <eq name="vo['fileonoff']['val']" value="true">
                                            <a href="index.php?m=Index&a=detailsplay&file={$vo.wswj.val}&title={$vo.title.val|urlencode=###|urlencode=###}&kjid={$vo.id.val}" title="{$vo.title.val}">
                                                <else />
                                                <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();"
                                                    title="{$vo.title.val}">
                                        </eq>
                                        <p>{$vo['title']['val']}</p>
                                        </a>
                                    </div>
                                </volist>
                                <elseif condition="$type eq 'dzjc'" />
                                <volist name='xiangguan' id='vo' key='k'>
                                    <div <if condition=" $file eq $vo['rwwj']['val'] "> class="swiper-slide active"
                                        <else /> class="swiper-slide" </if> >
                                        <eq name="vo['rwwjonoff']['val']" value="true">
                                            <a href="index.php?m=Index&a=detailsplay&file={$vo.rwwj.val}&title={$vo.title.val|urlencode=###|urlencode=###}&dzjc={$vo.id.val}" title="{$vo.title.val}">
                                                <else />
                                                <a href="javascript:(new $.zui.ModalTrigger({icon:'info-sign', title:'系统提示',custom:'尊敬的用户：你没有权限观看本内容，请登录相应的权限账号。' })).show();"
                                                    title="{$vo.title.val}">
                                        </eq>
                                        <p>{$vo['title']['val']}</p>
                                        </a>
                                    </div>
                                </volist>
                                </if>
                            </div>
                        </div>
                        <!-- 如果需要导航按钮 -->
                        <div class="swiper-button-prev"></div>
                        <div class="swiper-button-next"></div>
                    </div>
                </section>
            </div>
        </section>


        <include file="Index:footer" />
    </div>
    <i class="goTop"></i>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>
    <script>

        $(function () {
            var swiper = new Swiper('.swiper-container', { 
                pagination: '.swiper-pagination',
                slidesPerView: '120px',
                paginationClickable: true,
                slidesPerView: 6,
                spaceBetween: 10,
                prevButton:'.swiper-button-prev',
                nextButton:'.swiper-button-next',
            })

            $('.qrcode').qrcode(window.location.href);

            // 收藏
            var type = '{$type}';
            var bigimage = '';
            if (type == 'rwid' || type == 'dzjc') {
                bigimage = '{$xmid.rwspylt}';
            } else if (type == 'wkid') {
                bigimage = '{$xmid.wktp}';
            } else if (type == 'kjid') {
                bigimage = '{$xmid.dzkjylt}';
            }
            $(".star").on("click", function () {
                var src = $("#videosrc").attr("data-play");
                var typeid = '{$typeid}';
                var title = '{$title}';
                $.ajax({
                    type: "POST",
                    url: "index.php?g=Home&m=Index&a=savecollect",
                    data: "src=" + src + "&typeid=" + typeid + "&type=" + type + "&title=" + title + "&bigimage=" + bigimage,
                    dataType: "json",
                    success: function (resp) {
                        if (resp.code == '0002') {
                            alert(resp.msg);
                            window.location.href = "http://user.fjhgkj.com.cn/index.php?u=zy&url={$url1}";
                        } else if (resp.code == '0000') {
                            $(".star").find("i").addClass("on");
                        } else if (resp.code == '0005') {
                            $(".star").find("i").removeClass("on");
                        } else {
                            alert(resp.msg);
                        }
                    }
                });

            })
        })

        $('.sendpinglun').on('click', function () {
            var content = $("#pingluncontent").val();
            if (content == '') {
                alert('请先输入内容');
                return false;
            }



            var src = $("#videosrc").attr("data-play");
            var typeid = '{$typeid}';
            var type = '{$type}';
            $.ajax({
                type: "POST",
                url: "index.php?g=Home&m=Index&a=savecontent",
                data: "content=" + content + "&src=" + src + "&typeid=" + typeid + "&type=" + type,
                dataType: "json",
                success: function (resp) {
                    if (resp.code == '0002') {
                        alert(resp.msg);
                        window.location.href = "http://user.fjhgkj.com.cn/index.php?u=zy&url={$url1}";
                    } else if (resp.code == '0001') {
                        alert(resp.msg);
                        return false ;
                    } else {
                        var html = '<li>';
                        html += '<div class="head">';
                        html += '<img src="' + resp.ping.avatar + '">';
                        html += '<span class="name">{$realname}</span>';
                        html += '<span class="date">' + resp.ping.createtime + '</span>';
                        html += '</div>';
                        html += '<p class="text">' + resp.ping.content + '</p>';
                        html += '</li>';
                        $("#pingluncontent").val("") ;
                        $(".messages .box ul").append(html);
                        $(".messages .box").scrollTop($(".messages .box ul").height());
                    }
                }
            });
        })

    </script>
</body>

</html>